package com.tanhua.dubbo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.model.db.Report;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface ReportMapper extends BaseMapper<Report> {
    //根据userId和难度查上一次的报告
    @Select("select * from tb_report where level=#{level} and userId=#{userId} order by id desc")
    Report findByLastReport(@Param("level") String level,@Param("userId") Long userId);
}
